<div class="admin">
    <div class="tab panel dux-box admin-panel">
        <div class="panel-head"><strong>满减送管理</strong></div>
        <div class="padding border-bottom">
            <a href="JavaScript:void(0);" class="button button-small border-green">管理</a>
            <a href="{:U('add')}" class="button button-small border-green">添加</a>
        </div>
        <div class="table-tools clearfix ">
            <div class="float-left">
                <form method="get" action="{:U('index')}" name="formSearch" id="formSearch">
                    <div class="form-inline">
                        <div class="form-group">
                            <div class="field"><label>商户名：</label>
                                <input class="input input_big" type="text" name="keywrods" value="{$keywords}">
                            </div>
                            <div class="field"><label>有效期时间：</label>
                                <input class="input input_big hasDatepicker" type="text" value="" id="query_start_time" name="query_start_time" readonly="readonly">至
                                <input class="input input_big hasDatepicker" type="text" value="" id="query_end_time" name="query_end_time" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-button">
                            <button class="button bg-blue" type="submit">查询</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <form method="post" action="" name="myForm" id="myForm">
            <table class="table tb-type2 nobdb">
                <thead>
                    <tr class="thead">
                        <th width="5%">编号</th>
                        <th width="*">活动名称</th>
                        <th width="*">店铺名称</th>
                        <th width="12%">开始时间</th>
                        <th width="12%">结束时间</th>
                        <th width="20%">优惠信息</th>
                        <th width="5%">状态</th>
                        <th width="10%">操作</th>
                    </tr>
                </thead>
                <tbody>
                <foreach item="v" name="list">
                    <tr class="hover" style="background: rgb(255, 255, 255);">
                        <td>{$v['mansong_id']}</td>
                        <td>{$v['mansong_name']}</td>
                        <td>{$v['store_name']}</td>
                        <td>{$v['start_time']|date='Y-m-d H:i',###}</td>
                        <td>{$v['end_time']|date='Y-m-d H:i',###}</td>
                        <td class="nowrap align-center">
                    <foreach item='m' name='v[pMansong]'>
                        <div class="ncsc-mansong-rule">
                            <span >单笔订单满&nbsp;<strong>{$m['price']}</strong>，</span>
                            <span>立减现金&nbsp;<strong>{$m['discount']}</strong></span>
                        </div>
                    </foreach>
                    </td>
                    <td class="nowrap align-center">
                        <switch name="v.state">
                    <case value="1">未发布</case>
                    <case value="2">正常</case>
                    <case value="3">取消</case>
                    <case value="4">失效</case>
                    <case value="5">结束</case>
                    <default />
                    </switch>
                    </td>
                    <td class="w144 align-center">
                        <a class="button bg-blue button-little" href="{:U('edit',array('mansong_id'=>$v['mansong_id']))}"><i class="icon-edit"></i>修改</a>
                        <a  class="button bg-red button-little js-del" href="javascript:;" data="{$v['mansong_id']}" title="删除"><i class="icon-minus-circle"></i>删除</a>
                        <!-- 删除 -->
                    </td>
                    </tr>
                </foreach>

                </tbody>
                <tfoot>
                    <tr class="tfoot">
                        <td colspan="15"><div class="pages clearfix">{$page}</div></td>
                    </tr>
                </tfoot>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript">
    $('#myForm').layer({
        actionUrl: "batchAction",
        deleteUrl: "del",
    });
    $('#query_start_time').duxTime({
        format: "Y-m-d H:s"
    });
    $('#query_end_time').duxTime({
        format: "Y-m-d H:s"
    });
</script>